import { http,http_login } from "../axios"
export default {
  // 发布话题
  uploadTopics(data){
    return http_login.post('/api-topics/uploadTopics/',data)
  },
  // 获取全部话题数据
  getTopics(){
    return http.post('/api-topics/getTopics/')
  },
  // 获取单个话题数据
  getTopic(data){
    return http.post('/api-topics/getTopic/',data)
  },
  // 获取用户全部话题
  getUserTopics(data=null){
    return http.post('/api-topics/getUserTopics/',data)
  },
  // 删除用户话题
  removeTopics(data){
    return http_login.post('/api-topics/removeTopics/',data)
  },
  // 发表评论
  uploadComments(data){
    return http_login.post('/api-topics/uploadComments/',data)
  },
  // 删除评论
  removeComment(data){
    return http_login.post('/api-topics/removeComment/',data)
  },
  // 获取当前评论
  getComments(data){
    return http.post('/api-topics/getComments/',data)
  },
  // 举报话题或评论
  submitReport(data){
    return http_login.post('/api-topics/submitReport/',data)
  },
}